package com.ebupt.migu.music.effectStatistics.controller;

import com.ebupt.migu.music.common.util.ReqestParamUtil;
import com.ebupt.migu.music.effectStatistics.service.WeeklyTotalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * @author tz
 */
@RestController
@RequestMapping("/weeklyTotal")
public class WeeklyTotalController {

    @Autowired
    private HttpServletRequest request;
    @Autowired
    private WeeklyTotalService weeklyTotalService;

    @GetMapping("/export")
    public List<String> queryMap() {
        Map<String, Object> params = ReqestParamUtil.getParams(request);
        return weeklyTotalService.export(params);
    }
}
